﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using shenghua.Common.CustomValueType;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace shenghua.Common.Comments
{
    /// <summary>
    /// 评论基类
    /// </summary>
    public class Comment: Entity, IFullAudited
    {
        /// <summary>
        /// 评论的目标ID
        /// </summary>
        public int TargetId { get; set; }

        /// <summary>
        /// 评论者用户ID
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 评论者用户名
        /// </summary>
        public string UserName { get; set; }

        public string UserType { get; set; }

        /// <summary>
        /// 父级评论ID
        /// </summary>
        public int? ParentCommentId { get; set; }

        public string Content { get; set; }

        public ValueArray<string> Pictures { get; set; }

        public DateTime CreationTime { get; set; }
        public long? CreatorUserId { get; set; }
        public long? LastModifierUserId { get; set; }
        public DateTime? LastModificationTime { get; set; }
        public long? DeleterUserId { get; set; }
        public DateTime? DeletionTime { get; set; }
        public bool IsDeleted { get; set; }

        public Comment()
        {
            Pictures = new ValueArray<string>();
        }
    }
}
